package com.zxq.demo.core.helper;

import cn.hutool.json.JSONObject;
import com.zxq.demo.core.api.IJobHandler;
import com.zxq.demo.core.model.ZxqJobInfo;
import com.zxq.demo.core.utils.JobDataUtils;
import com.zxq.demo.core.utils.SpringContextUtils;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author zw
 * @description
 * @email 2408003640@qq.com
 * @date 2025/6/15 13:13
 */
@Component
public class ExecuteHelper {
    public void execute(Long jobId){
        ZxqJobInfo jobInfo = JobDataUtils.getJobDataById(jobId);
        IJobHandler jobHandler = SpringContextUtils.getBean(jobInfo.getExecutorHandler(), IJobHandler.class);
        jobHandler.execute("");
    }
}
